<include file="public@header"/>
<link rel="stylesheet" href="__TMPL__/public/assets/js/jquery-tags-input/jquery.tagsinput.min.css">
</head>
<body>
    <div class="lyear-layout-web">
        <div class="lyear-layout-container">
            <!--页面主要内容-->
            <main class="lyear-layout-content">
              
                <div class="container-fluid">
                
                    <div class="row">
                       <div class="col-md-12">
                            <div class="card">
                              <ul class="nav nav-tabs">
                                  <li class="active"><a>上传设置</a></li>
                              </ul>
                              <div class="card-body">
                                  <form method="post" class="js-ajax-form margin-top-20" role="form" action="{:url('setting/uploadPost')}">
                                      <div class="form-group">
                                          <label>最大同时上传文件数</label>
                                          <div class="row">
                                              <div class="col-md-4">
                                                  <input type="text" class="form-control" name="max_files" title="最大同时上传文件数" placeholder="最大同时上传文件数"
                                                         value="{$upload_setting.max_files|default=20}">
                                              </div>
                                              <div class="col-md-4">
                                              </div>
                                          </div>
                                          <p class="help-block">多文件上传时,用户能最大同时上传文件数,默认20个</p>
                                      </div>
                                      <div class="form-group">
                                          <label>文件分块上传分块大小</label>
                                          <div class="row">
                                              <div class="col-md-4">
                                                  <input type="text" class="form-control" name="chunk_size" title="文件分块上传分块大小KB,1M=1024KB"
                                                         placeholder="文件分块上传分块大小KB,1M=1024KB" value="{$upload_setting.chunk_size|default=512}">
                                              </div>
                                              <div class="col-md-4">
                                              </div>
                                          </div>
                                          <p class="help-block">文件上传采用分块上传,文件分块大小默认512KB,可以根据服务器最大上传限制设置此数值</p>
                                      </div>
                                      <div class="form-group">
                                          <label>图片文件</label>
                                          <div class="row">
                                              <div class="col-md-3">
                                                  <input type="text" class="form-control" name="file_types[image][upload_max_filesize]"
                                                         title="允许上传大小KB,1M=1024KB" placeholder="允许上传大小KB,1M=1024KB"
                                                         value="{$upload_setting.file_types.image.upload_max_filesize|default=10240}">
                                              </div>
                                              <div class="col-md-9">
                                                  <input type="text" class="form-control js-tags-input"
                                                         name="file_types[image][extensions]"
                                                         title="扩展名,以英文逗号分隔"
                                                         placeholder="扩展名,以英文逗号分隔"
                                                         value="{$upload_setting.file_types.image.extensions|default='jpg,jpeg,png,gif,bmp'}">
                                              </div>
                                          </div>
                                          <p class="help-block">允许上传大小默认为10240KB,1M=1024KB，允许上传格式默认为jpg,jpeg,png,gif,bmp</p>
                                      </div>
                                      <div class="form-group">
                                          <label>视频文件</label>
                                          <div class="row">
                                              <div class="col-md-3">
                                                  <input type="text" class="form-control"
                                                         name="file_types[video][upload_max_filesize]"
                                                         title="允许上传大小KB,1M=1024KB"
                                                         placeholder="允许上传大小KB,1M=1024KB"
                                                         value="{$upload_setting.file_types.video.upload_max_filesize|default=10240}">
                                              </div>
                                              <div class="col-md-9">
                                                  <input type="text" class="form-control js-tags-input"
                                                         name="file_types[video][extensions]"
                                                         title="扩展名,以英文逗号分隔"
                                                         placeholder="扩展名,以英文逗号分隔"
                                                         value="{$upload_setting.file_types.video.extensions|default='mp4,avi,wmv,rm,rmvb,mkv'}">
                                              </div>
                                          </div>
                                          <p class="help-block">允许上传大小默认为102400KB,1M=1024KB，允许上传格式默认为mp4,avi,wmv,rm,rmvb,mkv</p>
                                      </div>
                                      <div class="form-group">
                                          <label>音频文件</label>
                                          <div class="row">
                                              <div class="col-md-3">
                                                  <input type="text" class="form-control"
                                                         name="file_types[audio][upload_max_filesize]"
                                                         title="允许上传大小KB,1M=1024KB"
                                                         placeholder="允许上传大小KB,1M=1024KB"
                                                         value="{$upload_setting.file_types.audio.upload_max_filesize|default=10240}">
                                              </div>
                                              <div class="col-md-9">
                                                  <input type="text" class="form-control js-tags-input"
                                                         name="file_types[audio][extensions]"
                                                         title="扩展名,以英文逗号分隔"
                                                         placeholder="扩展名,以英文逗号分隔"
                                                         value="{$upload_setting.file_types.audio.extensions|default='mp3,wma,wav'}">
                                              </div>
                                          </div>
                                          <p class="help-block">允许上传大小默认为10240KB,1M=1024KB，允许上传格式默认为mp3,wma,wav</p>
                                      </div>
                                      <div class="form-group">
                                          <label>附件</label>
                                          <div class="row">
                                              <div class="col-md-3">
                                                  <input type="text" class="form-control" name="file_types[file][upload_max_filesize]"
                                                         title="允许上传大小KB,1M=1024KB" placeholder="允许上传大小KB,1M=1024KB"
                                                         value="{$upload_setting.file_types.file.upload_max_filesize|default=10240}">
                                              </div>
                                              <div class="col-md-9">
                                                  <input type="text" class="form-control js-tags-input"
                                                         name="file_types[file][extensions]"
                                                         title="扩展名,以英文逗号分隔"
                                                         placeholder="扩展名,以英文逗号分隔"
                                                         value="{$upload_setting.file_types.file.extensions|default='txt,pdf,doc,docx,xls,xlsx,ppt,pptx,zip,rar'}">
                                              </div>
                                          </div>
                                          <p class="help-block">
                                              允许上传大小默认为10240KB,1M=1024KB，允许上传格式默认为除以上文档类型以外的其它常用文件,如：txt,pdf,doc,docx,xls,xlsx,ppt,pptx,zip,rar</p>
                                      </div>
                                      <div class="form-group">
                                          <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                                      </div>
                                  </form>
                              </div>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>
<!--标签插件-->
<script src="__TMPL__/public/assets/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script src="__TMPL__/public/assets/js/admin.js"></script>
<script type="text/javascript">
      // 标签
  if($('.js-tags-input')[0]) {
    $('.js-tags-input').tagsInput({
      height: '36px',
      width: '100%',
      defaultText: '添加标签',
      removeWithBackspace: true,
      delimiter: [',']
    });
  }
</script>
</body>
</html>